package io.renren.service;

import io.renren.common.utils.PageUtils;
import io.renren.entity.TeamCountDto;
import io.renren.entity.TeamEntity;

import java.util.Map;

import com.baomidou.mybatisplus.service.IService;

/**
 * 推广团队表
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2018-04-14 14:11:21
 */
public interface TeamService extends IService<TeamEntity> {

	PageUtils queryPage(Map<String, Object> params);

	/**
	 * 根据ID统计当前会员的账务信息
	 * 
	 * @param mobile
	 * @return
	 */
	TeamCountDto selectAccountingByMemberId(Long memberId, String startDate, String endDate);

	/**
	 * 统计团队情况
	 * 
	 * @param memberId
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	TeamCountDto countTeam(Long memberId, String startDate, String endDate);

	/**
	 * 返佣金
	 * 
	 * @param memberId
	 * @param amount
	 */
	void commission(Long memberId, double amount);

	/**
	 * 房间返佣金
	 * 
	 * @param memberId
	 * @param amount
	 */
	void commissionRoom(Long memberId, double amount);

	/**
	 * 团队发包加总
	 * 
	 * @param memberId
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	Double teamSendPacket(Long memberId, String startDate, String endDate);
}
